home *** CD-ROM | disk | FTP | other *** search
/ ASME's Mechanical Engine…ing Toolkit 1997 December / ASME's Mechanical Engineering Toolkit 1997 December.iso / c_lang / varinc.lzh / PAGE74.C < prev    next >
Text File  |  1979-11-30  |  195b  |  9 lines

  1. #define ADD_SAFE(a, b, sum, errfn)
  2.    {
  3.    sum = (a) + (b);
  4.    if ((a) > 0 && (b) > 0 && sum <= 0)
  5.       errfn(a, b);
  6.    else if ((a) < 0 && (b) < 0 && sum >= 0)
  7.       errfn(a, b);
  8.    }
  9.